<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var test1 = document.createElement('h1');
        var content = document.createTextNode('灌篮高手');
        // 把h1放到body的末尾  
        // 先找到body
        document.body.appendChild(test1); // appendChild参数是一个元素
        test1.appendChild(content);

    </script>
</body>
</html>